package gui;


import java.awt.BorderLayout;

import javax.swing.BoxLayout;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;

import modelo.Mundo;

public class MundoFrame extends JFrame {
	
	private static final long serialVersionUID = 1L;
	
	private MapaPanel mapa;

	public MundoFrame() {
		super("Autitos");
		Mundo mundo = Mundo.getInstance();
		this.mapa = new MapaPanel(mundo.getMapa());
		initFrame();
	}
	
	protected void initFrame() {
		this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		JPanel content = new JPanel();
		content.setLayout(new BorderLayout());
		this.setContentPane(content);
		this.add(this.mapa, BorderLayout.CENTER);
		JLabel foot = new JLabel("UNQ-TPI-Programación Concurrente. Trabajo realizado por: Leandro Rinaudo - Hernán Slavich");
		foot.setHorizontalAlignment(JLabel.CENTER);
		this.add(foot , BorderLayout.SOUTH);
		this.setResizable(false);
		this.pack();
		this.setVisible(true);
	}
}
